const setRem = () => {
  // 根据屏幕尺寸动态设置html字体大小
  const sWidth = document.documentElement.clientWidth;
  document.documentElement.style.fontSize = sWidth / 10 + 'px'
}

setRem()
window.addEventListener('orientationchange', setRem)
window.addEventListener('resize', setRem)